<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1">
<title>template</title>
	<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
		 
<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.2.min.js"></script>
<script type="text/javascript">
	function init() {
		<c:set value="${adminVo.adminId }" var="admin"/>
		<c:set value="${userVo.userId }" var="user"/>
		var admin = "<c:out value="${admin}"/>";
		var user = "<c:out value="${user}"/>";
		if(user.length == 0 && admin.length != 0){
			alert(admin+"님 관리자 이시네요");
			location.href="/OffTheRecord/index/index.jsp";
		}
		if(user.length == 0 && admin.length == 0){
			var c = confirm("로그인 하시겠습니까?");
			if(c)
				location.href="/OffTheRecord/common/login.jsp";
			else
				location.href="/OffTheRecord/index/index.jsp";
		}
	}
	function deleteUser(){
		var flag = confirm("정말 탈퇴하시겠습니까?");
		if(flag)
			location.href="/OffTheRecord/deleteUser.action";
	}
</script>
</head>
<body onload="init()">
	<c:if test="${sessionScope.adminVo==null && sessionScope.userVo != null }">
		<c:import url="../common/top.jsp"/>
		<div class="container" style="margin: 60px;"></div>
		
<div class="container">
<div class="row">
<div class="col-xs-1 col-sm-1 col-md-1 col-lg-1"></div>

<!--  -->
<div class="col-xs-10 col-sm-10 col-md-10 col-lg-10">

	<div class="col-xs-3 col-sm-3 col-md-3 col-lg-3">
		<c:import url="../common/user_menu.jsp" />
	</div>
			
	<div class="col-xs-9 col-sm-9 col-md-9 col-lg-9">
	
		<div class="user_info user_info-tabs">
	      	<ul id="myTab" class="nav nav-tabs">
	        	<li class="active"><a href="#info" data-toggle="tab">내 정보</a></li>
	      	</ul>
	    
	    	<div id="myTabContent" class="tab-content">
				<div class="tab-pane fade in active" id="info">
					<div class="" style="padding: 10px;">
						<h2>아이디 : ${userVo.userId}</h2>
						<h2>이메일 : ${userVo.userEmail}</h2>
						<h2>포인트 : ${userVo.userPoint}</h2>
						<h3>내가 작성한 리뷰 : ${icr}개</h3>
						<h3>내 관심 기업 : ${ic}개</h3>
						<h3>내 관심 리뷰 : ${ir}개</h3>
					</div>
					<div class="" style="padding: 10px;">
						<button class="btn btn-default" onclick="deleteUser()">탈퇴하기</button>
					</div>
	        	</div>
			</div>
	    </div>
	</div>
			
</div>
<!--  -->
				
<div class="col-xs-1 col-sm-1 col-md-1 col-lg-1"></div>
</div><!-- row -->
</div><!-- container -->
	</c:if>

	<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>   
</body>
</html>